Learning device and learning method

ABSTRACT

A learning unit learns a neural network by inputting elements of learning data, on the basis of a learning reference label obtained by assigning an OK label or an NG label to each of the elements of the learning data, and outputs a classifier for determining at least one piece of data belonging to an NG determination group to be NG. A dynamic update unit dynamically updates the learning reference label during learning of the neural network by the learning unit.

TECHNICAL FIELD

The present invention relates to a learning device and a learning methodfor learning a classifier using a neural network.

BACKGROUND ART

Generally, learning image data used for performing abnormality detectionis determined to be normal (hereinafter referred to as OK) or abnormal(hereinafter referred to as NG) for each image.

Meanwhile, in learning image data determined to be NG, an image areaincluding an NG element is often local, and most areas are not locallydifferent from learning image data that is determined to be OK.

Known in the related art is machine learning that uses learning dataincluding multiple elements in each of which is determined to be OK orNG.

For example, Patent Literature 1 discloses technology in which an inputimage is divided into multiple image areas, and a label fordistinguishing between a foreground and a background is assigned to eachof the divided image areas. In this technology, it is estimated whethera pixel to which an unconfirmed label has been assigned is a foregroundor a background on the basis of continuity from an image area assignedwith a confirmed label of the foreground or the background.

CITATION LIST Patent Literature

Patent Literature 1: JP 2012-208913 A

SUMMARY OF INVENTION Technical Problem

In a case where an image, a moving image, or multidimensional data isclassified as OK or NG by machine learning, data determined to be OK orNG by a human is often provided as learning data. However, it is rarethat all elements included in the learning data are NG, and in manycases determination as NG is made only from unspecified elements. Usingsuch learning data results in erroneously learning an element that isoriginally OK as NG, and thus there is a disadvantage that theclassification accuracy of a classifier, as a learning result, isdeteriorated.

An object of the present invention is to solve the above disadvantage,and an object of the invention is to obtain a learning device and alearning method that can provide a classifier that performs highlyaccurate classification.

Solution to Problem

A learning device according to the present invention includes a learningunit and a dynamic update unit. The learning unit inputs learning dataincluding multiple elements and group information in which it is definedthat at least one piece of data belonging to a group is determined to beNG, and learns a neural network by inputting the multiple elements ofthe learning data and using a learning reference label assigned with anOK label or an NG label for each of the elements of the learning data,thereby outputs a classifier for determining the at least one piece ofdata belonging to the group to be NG using the neural network which is aresult of the learning. The dynamic update unit dynamically updates thelearning reference label during the learning of the neural network bythe learning unit. In this configuration, the learning unit generates aninitial value of the learning reference label for each of the elementsof the learning data by using the learning data and the groupinformation, repetitively learns the neural network, by sequentiallyusing the learning reference label updated from the initial value of thelearning reference label by the dynamic update unit, and calculates anNG index value with which each of the elements of the learning data canbe NG, by using an output value of the neural network for eachrepetition of learning. The dynamic update unit updates the learningreference label, on the basis of a result obtained by statisticallytesting a change trend of the NG index value obtained for eachtransition of the number of learning repetitions.

Advantageous Effects of Invention

According to the present invention, the learning device can provide aclassifier for performing high-precision classification by determiningat least one piece of data belonging to a group to be NG.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a configuration of a learningdevice according to a first embodiment of the invention.

FIG. 2 is a block diagrams illustrating a detailed configuration of alearning device according to the first embodiment.

FIG. 3 is a table illustrating an example of the contents of a learningdata DB.

FIG. 4 is a table illustrating an example of the contents of an NGdetermination group DB.

FIG. 5 is a table illustrating an example of the contents of a learningreference label buffer.

FIG. 6 is a diagram illustrating an example of a configuration of aneural network.

FIG. 7 is a table illustrating an example of the contents of an NG indexvalue buffer.

FIG. 8 is a table illustrating an example of the contents of a historybuffer.

FIG. 9 is a table illustrating an example of the contents of an NGcandidate buffer.

FIG. 10A is a block diagram illustrating a hardware configuration forimplementing functions of the learning device according to the firstembodiment. FIG. 10B is a block diagram illustrating a hardwareconfiguration for executing software for implementing the functions ofthe learning device according to the first embodiment.

FIG. 11 is a flowchart illustrating a learning method according to thefirst embodiment.

FIG. 12 is a flowchart illustrating a learning reference labelgenerating process.

FIG. 13 is a flowchart illustrating a neural network managing process.

FIG. 14 is a flowchart illustrating a history managing process of NGindex values.

FIG. 15 is a flowchart illustrating a statistical test process of NGindex values.

FIG. 16 is a flowchart illustrating a learning reference label updatingprocess.

FIG. 17 is a flowchart illustrating a neural network parameter updatingprocess.

DESCRIPTION OF EMBODIMENTS

To describe the present invention further in detail, embodiments forcarrying out the invention will be described below along with theaccompanying drawings.

First Embodiment

FIG. 1 is a block diagram illustrating a configuration of a learningdevice 1 according to a first embodiment of the invention.

The learning device 1 generates neural network parameters that provide aclassifier of a learning result, by updating neural network initialparameters using learning data input from a learning data database(hereinafter referred to as the learning data DB) 2 and NG determinationgroup information input from an NG determination group database(hereinafter referred to as the NG determination group DB) 3.

The learning data stored in the learning data DB 2 includes multipleelements. For example, in a case where the learning data is image data,individual image areas obtained by dividing an image indicated by theimage data into multiple pieces are elements. In the NG determinationgroup information stored in the NG determination group DB 3, it isdefined that at least one piece of data belonging to an NG determinationgroup is determined to be NG.

The learning device 1 includes a learning unit 10 and a dynamic updateunit 11. The learning unit 10 inputs learning data from the learningdata DB 2, inputs NG determination group information from the NGdetermination group DB 3, and learns a neural network by inputtingmultiple elements of the learning data and using a learning referencelabel for each of the elements of the learning data. A learningreference label is information in which an OK label or an NG label isassigned to each of the elements of the learning data. The learning unit10 outputs neural network parameters that provide the classifier thatdetermines at least one piece of the data belonging to the NGdetermination group to be NG.

The learning unit 10 further generates an initial value of a learningreference label for each of the elements of the learning data using thelearning data and the NG determination group information, andrepetitively learns the neural network by sequentially using a learningreference label that is dynamically updated from the initial value ofthe learning reference label by the dynamic update unit 11. The learningunit 10 calculates an index value with which an element of the learningdata can be NG (hereinafter, referred to as an NG index value), by usingan output value of the neural network for each repetition of learning.

The dynamic update unit 11 dynamically updates the learning referencelabel while the learning unit 10 learns the neural network.Specifically, the dynamic update unit 11 statistically tests the changetrend of the NG index value obtained for each transition of the numberof learning repetitions, and updates the learning reference label on thebasis of the statistical test result. The dynamic update unit 11 updatesan NG label, assigned to an element that is originally OK in thelearning reference label, to an OK label by using the statistical testresult of the change trend of NG index values.

FIG. 2 is a block diagram illustrating a detailed configuration of thelearning device 1 according to the first embodiment. As illustrated inFIG. 2, the learning unit 10 includes a learning reference label buffer10 a, a learning reference label generating unit 10 b, a neural networkmanaging unit 10 c, a neural network updating unit 10 d, and an NG indexvalue buffer 10 e. The dynamic update unit 11 includes a history buffer11 a, an NG candidate buffer 11 b, a history managing unit 11 c, a testunit 11 d, and a learning reference label updating unit 11 e.

Neural network initial parameters are parameters that define the initialstate of the neural network. For example, the neural network initialparameters include initial values of the number of nodes of a hiddenunit in the neural network, weight parameters assigned between nodes,bias parameters, and learning rate parameters. These parameters aredescribed in Reference Literature 1 below. With the learning device 1updating the neural network initial parameters, neural networkparameters are generated which provide the classifier that determines atleast one piece of data belonging to the NG determination group to beabnormal.

Reference Literature 1: C. M. Bishop, Hiroshi Motoda (supervising atranslation), “Pattern Ninshiki To Kikai Gakusyu, Jyou”, MaruzenPublishing, pp. 225-247.

The learning data DB 2 stores learning data including multiple elements.FIG. 3 is a table illustrating an example of the contents of thelearning data DB 2. In FIG. 3, learning data includes multiple elementsidentified by respective “data IDs”, and each of the multiple elementsincludes a “data value series”. For example, illustrated in FIG. 3 arean element having a data ID of D0001, an element having a data ID ofD0002, an element having a data ID of D0003, an element having a data IDof D0004, . . . , which are included in certain learning data.

The NG determination group DB 3 stores NG determination groupinformation including classification information of NG determinationgroups and classification information of elements of learning databelonging to the NG determination groups. FIG. 4 is a table illustratingan example of the contents of the NG determination group DB 3. Each ofthe multiple elements included in the learning data is classified by a“data ID” as in FIG. 3. An NG determination group is classified by an“NG determination group ID”. For example, an element having a data ID ofD0001, an element having a data ID of D0002, and an element having adata ID of D0004 belong to an NG determination group having an NGdetermination group ID of G001, and at least one of these elements isdetermined to be NG.

The learning reference label buffer 10 a stores a learning referencelabel for each element of the learning data. FIG. 5 is a tableillustrating an example of the contents of the learning reference labelbuffer 10 a. As illustrated in FIG. 5, learning reference labelinformation includes data ID, OK flag, and NG flag of each of theelements of the learning data. Each of the multiple elements included inthe learning data is classified by a “data ID” as in FIG. 3. For anelement assigned with an OK label, value 1 is set in the OK flagcorresponding to this element, and value 0 is set in the NG flagcorresponding to this element. Conversely, for an element assigned withan NG label, value 0 is set in the OK flag corresponding to thiselement, and value 1 is set in the NG flag corresponding to thiselement.

The learning reference label generating unit 10 b generates initialvalues of the learning reference label on the basis of a determinationresult as to whether or not the learning data belongs to the NGdetermination group. For example, the learning reference labelgenerating unit 10 b determines whether or not among the data IDs of theelements registered in the learning data DB 2, there is a data ID whichis same as that of an element belonging to the NG determination group inthe NG determination group DB 3. If it is determined that there is asame data ID as that of an element belonging to the NG determinationgroup, the learning reference label generating unit 10 b generates alearning reference label in which value 0 is set in the OK flagcorresponding to this element and value 1 is set in the NG flagcorresponding thereto, and stores the learning reference label in thelearning reference label buffer 10 a.

The neural network managing unit 10 c manages learning of a neuralnetwork for sorting an element corresponding to a data ID stored in thelearning data DB 2 to a class (OK class or NG class) that corresponds toa flag having a value of 1 among the OK flag and the NG flag thatcorresponds to the data ID in the learning reference label buffer 10 a.

FIG. 6 is a diagram illustrating an example of a configuration of theneural network. As illustrated in FIG. 6, the neural network includes aninput layer, a hidden layer, and an output layer. When a data valueseries x₁, x₂, . . . , x_(N) included in an element of learning data isinput to the input layer, z₁, z₂, . . . , z_(M) are calculated bynonlinear transformation of the multiplication sum of weight parametersbetween the input layer nodes and the hidden layer nodes and x₁, x₂, . .. , x_(N). Subsequently, y₁ and y₂ obtained by nonlinearly transformingthe multiplication sum of weight parameters between the hidden layernodes and the output layer nodes and z₁, z₂, . . . , z_(M) are outputfrom the output layer.

The output values y₁ and y₂ are NG evaluation values for each class,with the output value y₁ representing the degree to which the elementbelongs to the OK class, and the output value y₂ representing the degreeto which the element belongs to the NG class. An element (data valueseries) input to the neural network is determined to belong to the OKclass when y₁>y₂ holds, and is determined to belong to the NG class wheny₁≤y₂ holds. The NG index value may be a ratio between y₂ and y₁corrected so that the denominator of the ratio is other than 0; however,hereinafter, y₂−y₁ will be the NG index value.

Note that although the neural network having one hidden layer isillustrated in FIG. 6, the neural network managed by the neural networkmanaging unit 10 c may have multiple hidden layers.

The neural network updating unit 10 d outputs neural network parametersthat provide a classifier of a learning result by updating neuralnetwork parameters on the basis of the NG index value obtained by theneural network managing unit 10 c. For example, the neural networkupdating unit 10 d updates neural network parameters using the parameteroptimization method described in Reference Literature 1. When the numberof repetitions of learning reaches a threshold value or when thecondition for terminating the learning is satisfied, the neural networkupdating unit 10 d outputs neural network parameters optimized andupdated at that stage to the outside of the learning device 1.

The NG index value buffer 10 e stores an NG index value for each elementof the learning data obtained in the course of learning repetitions ofthe neural network. FIG. 7 is a table illustrating an example of thecontents of the NG index value buffer 10 e. A data ID of an element ofthe learning data, and an NG index value as of the time when calculatedby the neural network managing unit 10 c, out of NG index values of thiselement, are set in the NG index value buffer 10 e.

The history buffer 11 a stores the number of learning repetitions and anNG index value corresponding thereto for each element of the learningdata. FIG. 8 is a table illustrating an example of the contents of thehistory buffer 11 a. In the history buffer 11 a, NG index values for thenumber of learning repetitions of 1, 100, and 200 are set. For example,for an element with a data ID of D0001, an NG index value obtained whenthe number of learning repetitions is 1 is 0.55, an NG index valueobtained when the number of learning repetitions is 100 is 0.35, and anNG index value obtained when the number of learning repetitions is 200is 0.12.

The NG candidate buffer 11 b stores the number of learning repetitions,an NG candidate level, an OK confirmed flag, and an NG confirmed flagfor each element of the learning data. FIG. 9 is a table illustrating anexample of the contents of the NG candidate buffer 11 b. As illustratedin FIG. 9, data IDs of elements of the learning data, NG candidatelevels, OK confirmed flags, and the NG confirmed flags are set in the NGcandidate buffer 11 b. The NG candidate level varies depending on a pastvalue of the NG index value.

An NG candidate is an element assigned with an NG label in the learningreference label, and an NG candidate level corresponds to an NG indexvalue that corresponds to the element of the NG candidate.

An OK confirmed flag indicates that an element is confirmed to be OK.For example, if value 0 is set in the OK confirmed flag, it indicatesthat the element corresponding to the OK confirmed flag is not confirmedto be OK, and if value 1 is set, it indicates that the elementcorresponding to the OK confirmed flag is confirmed to be OK. On theother hand, an NG confirmed flag indicates that an element is confirmedto be NG. For example, if value 0 is set in the NG confirmed flag, itindicates that the element corresponding to the NG confirmed flag is notconfirmed to be NG, and if value 1 is set, it indicates that the elementcorresponding to the NG confirmed flag is confirmed to be NG.

The history managing unit 11 c stores, in the history buffer 11 a, an NGindex value for each element of the learning data, obtained for eachrepetition of learning. For example, the history managing unit 11 cstores, in the history buffer 11 a, an NG index value stored in the NGindex value buffer 10 e together with the number of learning repetitionsat that time. As a result, an NG index value obtained at each presetnumber of learning repetitions (in the example of FIG. 8, one time, 100times, and 200 times) is stored in the history buffer 11 a.

The test unit 11 d statistically tests the change trend of NG indexvalues stored in the history buffer 11 a, and updates the contents ofthe NG candidate buffer 11 b for each element of the learning data onthe basis of the statistical test result. For example, the test unit 11d extracts, from the history buffer 11 a, a time series of NG indexvalues for respective transitions of the number of learning repetitionsthat corresponds to the element to be processed. Next, the test unit 11d statistically tests the time series of the NG index values extractedfrom the history buffer 11 a to confirm the change trend of the NG indexvalues.

The test unit 11 d performs an irregularity test on the time series ofthe NG index values. In a case where by the irregularity test it isconfirmed that there is no regularity in the change of the NG indexvalues, the test unit 11 d leaves this element as the NG candidate. In acase where it is confirmed that there is regularity, the test unit 11 dperforms a trend test on the time series of the NG index values. If bythe trend test it is confirmed that the NG index values have an upwardtrend, the test unit 11 d leaves this element as the NG candidate.

When the time series of the NG index values has regularity and an upwardtrend thereof is confirmed, the test unit 11 d determines this elementto be NG-confirmed, and sets value 1 to the NG confirmed flagcorresponding to this element in the NG candidate buffer 11 b. On theother hand, when the time series of the NG index values has regularityand a downward trend thereof is confirmed, the test unit 11 d determinesthis element to be OK-confirmed, and sets value 1 to the OK confirmedflag corresponding to this element in the NG candidate buffer 11 b.

As methods of testing the irregularity and the trend, test methodsdescribed in Reference Literature 2 below may be used.

Reference Literature 2: Shinsuke Muto, “Toukei Kaiseki Handbook”,Asakura Publishing Co. Ltd., pp. 398-399 and 402-403.

The learning reference label updating unit 11 e updates the learningreference label of an element of the learning data that is confirmed tobe OK by the test unit 11 d, from the NG label to the OK label. Forexample, when an element of the learning data is confirmed to be OK bythe test unit 11 d, the learning reference label updating unit 11 e setsvalue 1 to the OK flag in the learning reference label corresponding tothis element, and sets value 0 to the NG flag.

The functions of the learning unit 10 and the dynamic update unit 11 inthe learning device 1 are implemented by a processing circuit. That is,the learning device 1 includes a processing circuit for performingprocesses of steps ST1 to ST5 in FIG. 11 which will be described later.The processing circuit may be dedicated hardware or a central processingunit (CPU) for executing a program stored in a memory.

FIG. 10A is a block diagram illustrating a hardware configuration forimplementing the functions of the learning device 1. FIG. 10B is a blockdiagram illustrating a hardware configuration for executing software forimplementing the functions of the learning device 1. In 10A and 10B, aninformation input interface 100 relays input of information from anexternal device (not illustrated) to the learning device 1 illustratedin FIGS. 1 and 2. For example, the neural network managing unit 10 cillustrated in FIG. 2 inputs neural network initial parameters from anexternal device via the information input interface 100. The externaldevice may be a storage device provided independently of the learningdevice 1. For example, the learning device 1 may use a storage device ona cloud network.

ADB input/output interface 101 relays data exchange between the learningdevice 1 and a database 102. The database 102 corresponds to thelearning data DB 2 and the NG determination group DB 3 illustrated inFIGS. 1 and 2. For example, the learning reference label generating unit10 b included in the learning unit 10 inputs data from the learning dataDB 2 and the NG determination group DB 3 via the DB input/outputinterface 101. Note that the database 102 may be configured in a storagedevice provided independently of the learning device 1. For example, thelearning device 1 inputs data from the database 102 configured in astorage device on a cloud network via the DB input/output interface 101.

The learning reference label buffer 10 a, the NG index value buffer 10e, the history buffer 11 a, and the NG candidate buffer 11 b illustratedin FIG. 2 are configured in a memory incorporated in a processingcircuit 104 illustrated in FIG. 10A or in a memory 106 illustrated inFIG. 10B. An information output interface 103 relays information outputfrom the learning device 1 to an external device (not illustrated). Forexample, the neural network updating unit 10 d illustrated in FIG. 2outputs neural network parameters to the external device via theinformation output interface 103. The external device may be, forexample, an abnormality detection device that uses a classifier providedby the neural network parameters.

In a case where the processing circuit is the processing circuit 104 ofdedicated hardware illustrated in FIG. 10A, the processing circuit 104may be, for example, a single circuit, a composite circuit, a programmedprocessor, a parallel programmed processor, an application specificintegrated circuit (ASIC), a field-programmable gate array (FPGA), or acombination thereof. The functions of the learning unit 10 and thedynamic update unit 11 in the learning device 1 may be implemented byseparate processing circuits, or these functions may be collectivelyimplemented by a single processing circuit.

In the case where the processing circuit is the processor 105illustrated in FIG. 10B, the functions of the learning unit 10 and thedynamic update unit 11 in the learning device 1 are implemented bysoftware, firmware, or a combination of software and firmware. Note thatthe software or the firmware is described as a program and is stored inthe memory 106.

The processor 105 reads and executes the program stored in the memory106 and thereby implements functions of the learning unit 10 and thedynamic update unit 11 in the learning device 1.

That is, the learning device 1 includes the memory 106 for storingprograms execution of which by the processor 105 results in execution ofprocesses of steps ST1 to ST5 illustrated in FIG. 11. These programscause a computer to execute the procedure or method of the learning unit10 and the dynamic update unit 11. The memory 106 may be acomputer-readable storage medium storing the programs for causing acomputer to function as the learning unit 10 and the dynamic update unit11.

The memory 106 corresponds to a nonvolatile or volatile semiconductormemory such as a random access memory (RAM), a read only memory (ROM), aflash memory, an erasable programmable read only memory (EPROM), or anelectrically-EPROM (EEPROM), a magnetic disc, a flexible disc, anoptical disc, a compact disc, a mini disc, a DVD, or the like.

Some of the functions of the learning unit 10 and the dynamic updateunit 11 may be implemented by dedicated hardware, and some thereof maybe implemented by software or firmware. For example, the learning unit10 implements functions thereof using a processing circuit that isdedicated hardware, whereas the dynamic update unit 11 implementsfunctions thereof by causing the processor 105 to read and executeprograms stored in the memory 106. In this manner, the processingcircuit can implement the functions described above by hardware,software, firmware, or a combination thereof.

Next, the operation will be described.

FIG. 11 is a flowchart illustrating a learning method according to thefirst embodiment.

In step ST1, the learning reference label generating unit 10 b setsvalue 0 to the OK flag corresponding to an element belonging to the NGdetermination group and sets value 1 to the NG flag correspondingthereto, among the multiple elements of the learning data, and therebygenerates a learning reference label for each of the elements of thelearning data. Moreover, the neural network managing unit 10 cconfigures an initial state neural network using the neural networkinitial parameters.

In step ST2, the neural network managing unit 10 c inputs the elementsof the learning data to the neural network, and calculates an NG indexvalue for each of the elements on the basis of the output result of theneural network. Next, the neural network managing unit 10 c determineswhether a target element belongs to the OK class or the NG class on thebasis of the NG index value. Subsequently, the neural network managingunit 10 c performs error evaluation on the initial value of the learningreference label corresponding to the target element and the learningreference label updated by the dynamic update unit 11, and thedetermined class, by using an error function. A function described inReference Literature 1 may be used as the error function. Furthermore,the history managing unit 11 c stores the NG index values obtained eachtime the learning is repeated in the history buffer 11 a.

In step ST3, the test unit 11 d evaluates whether an NG candidateelement is to be confirmed to be OK or NG, on the basis of the result ofstatistically testing the change trend of the NG index values stored inthe history buffer 11 a. The learning reference label updating unit 11 eupdates the learning reference label on the basis of the evaluationresult by the test unit 11 d. For example, the learning reference labelupdating unit 11 e updates the learning reference label corresponding toan element confirmed to be OK by the test unit 11 d, from an NG label toan OK label.

In step ST4, the neural network updating unit 10 d updates neuralnetwork parameters on the basis of the NG index value obtained by theneural network managing unit 10 c. The series of learning processes fromstep ST2 to step ST4 is repetitively performed for each of the multipleelements included in the learning data.

When the learning repetition is completed, the neural network updatingunit 10 d outputs the neural network parameters updated by theabove-described series of learning, as a learning result (step ST5).

Next, a learning reference label generating process will be described indetail.

FIG. 12 is a flowchart illustrating the learning reference labelgenerating process, and illustrates a process for generating initialvalues of the learning reference label.

The learning reference label generating unit 10 b sequentially reads adata ID of each element of the learning data registered in the learningdata DB 2 and executes the following processes.

The learning reference label generating unit 10 b determines whether ornot, among the data IDs of the elements read from the learning data DB2, there is a data ID same as a data ID of an element belonging to theNG determination group registered in the NG determination group DB 3(step ST1 a).

If it is determined that the data ID of a target element is the same asa data ID of an element belonging to the NG determination group (stepST1 a: YES), the learning reference label generating unit 10 b setsvalue 0 to the OK flag corresponding to the target element and value 1to the NG flag corresponding thereto (step ST2 a). On the other hand, ifit is determined that the data ID of a target element is different fromthe data IDs of the elements belonging to the NG determination group(step ST1 a: NO), the learning reference label generating unit 10 b setsvalue 1 to the OK flag corresponding to the target element and value 0to the NG flag corresponding thereto (step ST3 a).

Having set values in the OK flag and the NG flag corresponding to thetarget element, the learning reference label generating unit 10 b storesthe data ID and the values of the OK flag and the NG flag of the targetelement in the learning reference label buffer 10 a (step ST4 a).

The learning reference label generating unit 10 b repeatedly executesthe series of processes from step ST1 a to step ST4 a for all theelements of the learning data registered in the learning data DB 2. Bythe processes, initial values of the learning reference labels aregenerated.

Next, a neural network managing process will be described in detail.

FIG. 13 is a flowchart illustrating the neural network managing process,and illustrates a process of calculating an NG index value for eachelement.

In the initial process, the neural network managing unit 10 c configuresan initial state neural network on the basis of the neural networkinitial parameters (step ST1 b).

Next, the neural network managing unit 10 c inputs the elements of thelearning data read from the learning data DB 2 (data value series D_(i))to the neural network, and obtains output values y_(1_i) and y_(2_i)calculated in the output layer (step ST2 b). As described above, theoutput value y_(1_i) represents the degree to which the element belongsto the OK class, and the output value y_(2_i) indicates the degree towhich the element belongs to the NG class. An element (data value seriesD_(i)) input to the neural network is determined to belong to the OKclass when y_(1_i)>y_(2_i) holds, and is determined to belong to the NGclass when y_(1_i)≤y_(2_i) holds. The neural network managing unit 10 cperforms error evaluation on the determined class and the learningreference label.

In step ST3 b, the neural network managing unit 10 c calculatesy_(2_i)−y_(1_i) as an NG index value NGE and stores the calculated NGindex value NGE in the NG index value buffer 10 e together with the dataID of the corresponding element.

Note that although y_(2_i)−y_(1_i) is used as NGE, the ratio of y_(1_i)and y_(2_i) may be used as NGE, or a distance considering thedistribution of y_(1_i) and y_(2_i) may be used as NGE_(i).

The neural network managing unit 10 c repeatedly executes the series ofprocesses from step ST2 b to step ST3 b for all the elements of thelearning data registered in the learning data DB 2.

Next, a history managing process of NG index values will be described indetail.

FIG. 14 is a flowchart illustrating the history managing process of NGindex values.

First, the history managing unit 11 c determines whether or not thenumber of learning repetitions is divisible by a certain number (forexample, 100) (step ST1 c). The number of learning repetitions is thenumber of times that the series of processes by the learning unit 10from step ST2 to step ST4 illustrated in FIG. 11 is repetitivelyperformed.

If it is determined that the number of learning repetitions is divisibleby a certain number (step ST1 c: YES), the history managing unit 11 cextracts a data ID and a series of NG index values of elementscorresponding to the data ID from the NG index value buffer 10 e (stepST2 c).

Next, the history managing unit 11 c adds the current number of learningrepetitions to the extracted data ID and the series of NG index valuesand stores them in the history buffer 11 a (step ST3 c).

Then the history managing unit 11 c terminates the process of FIG. 14and proceeds to the process of the test unit 11 d.

On the other hand, if it is determined that the number of learningrepetitions is not divisible by a certain number (step ST1 c: NO), thehistory managing unit 11 c terminates the process of FIG. 14, andproceeds to the process of the neural network updating unit 10 d.

Next, a statistical test process of NG index values will be described indetail.

FIG. 15 is a flowchart illustrating a statistical test process of NGindex values.

The test unit 11 d extracts, from the history buffer 11 a, a seriesV_(j) of NG index values for each number of learning repetitions thatcorrespond to the data ID of a j-th element (target element), andconverts the extracted series V_(j) of NG index values to a series L_(j)of NG candidate levels (step ST1 d). The series L_(j) is determined bywhat number of a range, obtained by equally dividing the range of thepast values of the series V_(j) by a certain number, the current NGindex value belongs to.

For example in a case where the range of past values of the series V_(j)of NG index values is equally divided into five ranges, NG candidatelevels are assigned as −2, −1, 0, +1, and +2 as illustrated in FIG. 9.

NG candidate level 0 corresponds to the middle range of the past NGindex values. NG candidate level +1 corresponds to a range where the NGindex value is larger than in the middle range, and NG candidate level+2 corresponds to a range where the NG index value is larger than in therange corresponding to NG candidate level +1. NG candidate level −1corresponds to a range where the NG index value is smaller than in themiddle range, and NG candidate level −2 corresponds to a range where theNG index value is smaller than in the range corresponding to NGcandidate level −1.

Note that initially there is only one NG index value, and thus the rangeof past values of the series V_(j) is 0. The NG candidate level at thispoint is set to 0.

The test unit 11 d determines whether or not value 1 is set in the OKconfirmed flags corresponding to all elements other than the targetelement, among the elements belonging to the NG determination group towhich the target element (NG candidate) belongs (step ST2 d). At thispoint, if value 0 is set in the OK confirmed flag corresponding to anyone of the elements (step ST2 d: NO), the test unit 11 d refers to theNG candidate buffer 11 b and confirms whether or not value 0 is set inboth the NG confirmed flag and the OK confirmed flag corresponding tothe target element (step ST3 d).

If value 1 is set in the NG confirmed flag or the OK confirmed flag(step ST3 d: NO), the test unit 11 d updates the data corresponding tothe target element in the NG candidate buffer 11 b with the currentnumber of learning repetitions, the current NG candidate level of thetarget element, and the values of the current OK confirmed flag and NGconfirmed flag of the target element (step ST4 d).

Then, the test unit 11 d continues to extract a series V_(j+1) of NGindex values corresponding to the data ID of the (j+1)th element fromthe history buffer 11 a, and repeats the processes from step ST1 d.

Of the elements belonging to the NG determination group to which thetarget element belongs, if value 1 is set in OK confirmed flagscorresponding to all elements other than the target element (step ST2 d:YES), the test unit 11 d determines the value to be set in the NGconfirmed flag corresponding to the target element, to be “1” (step ST5d). Then, the test unit 11 d proceeds to the process of step ST4 d andsets value 1 to the NG confirmed flag corresponding to the targetelement in the NG candidate buffer 11 b to be updated.

If value 0 is set in both the NG confirmed flag and the OK confirmedflag corresponding to the target element (step ST3 d: YES), the testunit 11 d performs an irregularity test based on a certain reliabilitycoefficient (for example, 0.95) on the series L_(j) of NG candidatelevels (step ST6 d). The test unit 11 d determines whether or not theseries L_(j) of NG candidate levels has regularity, on the basis of theresult of the irregularity test on the series L_(j) of NG candidatelevels (step ST7 d).

If regularity is not confirmed in the series L_(j) of NG candidatelevels, and it is determined that the change trend of the NG indexvalues randomly changes each time learning is repeated (step ST7 d: NO),the test unit 11 d does not confirm the target element to be OK nor NG.Thereafter, the test unit 11 d proceeds to the process of step ST4 d.

If it is determined that the change trend of the NG index values isregular for each repetition of learning after regularity is confirmed inthe series L_(j) of NG candidate levels (step ST7 d: YES), the test unit11 d performs an upward trend test on the series L_(j) of NG candidatelevels (step ST8 d). The test unit 11 d determines whether or not theseries L_(j) of NG candidate levels has an upward trend, on the basis ofthe result of the trend test on the series L_(j) of NG candidate levels(step ST9 d).

If the series L_(j) of NG candidate levels has an upward trend (step ST9d: YES), the test unit 11 d determines that the NG index value increaseseach time learning is repeated, and proceeds to the process of step ST5d. As a result, a value to be set in the NG confirmed flag correspondingto the target element is determined to be “1”, and NG is confirmed.

On the other hand, if no upward trend is confirmed in the series L_(j)of NG candidate levels (step ST9 d: NO), the test unit 11 d performs adownward trend test on the series L_(j) of NG candidate levels (stepST10 d). The test unit 11 d determines whether or not the series L_(j)of NG candidate levels has a downward trend, on the basis of the resultof the trend test on the series L_(j) of NG candidate levels (step ST11d).

If no downward trend is confirmed in the series L_(j) of NG candidatelevels (step ST11 d: NO), the test unit 11 d proceeds to the process ofstep ST4 d and determines the value of the series L_(j) to be thecurrent NG candidate level, which is caused to be reflected in the NGcandidate buffer 11 b.

When a downward trend is confirmed in the series L_(j) of NG candidatelevels (step ST11 d: YES), the test unit 11 d determines that the NGindex value becomes smaller each time learning is repeated, anddetermines a value to be set in the OK confirmed flag corresponding tothe target element to be “1” (step ST12 d). Then, the test unit 11 dproceeds to the process of step ST4 d and sets value 1 to the OKconfirmed flag corresponding to the target element in the NG candidatebuffer 11 b to be updated.

Next, a learning reference label updating process will be described indetail.

FIG. 16 is a flowchart illustrating the learning reference labelupdating process.

The learning reference label updating unit 11 e extracts, from the NGcandidate buffer 11 b, a data ID of an element having the OK confirmedflag set to value 1, as a series U free from redundancy (step ST1 e).The series U includes the data ID of the element having the OK confirmedflag set to value 1.

Next, the learning reference label updating unit 11 e specifies a recordhaving the same data ID as the data ID included in the series U in thelearning reference label buffer 10 a, and updates the learning referencelabel so that the OK flag has value 1 and the NG flag has value 0 forthe specified record (step ST2 e). Since this process is executed duringthe learning of the neural network by the learning unit 10, the learningreference label is dynamically updated.

Next, a neural network parameter updating process will be described indetail.

FIG. 17 is a flowchart illustrating the neural network parameterupdating process.

The neural network updating unit 10 d extracts, from the NG index valuebuffer 10 e, an NG index value calculated from the output result of theneural network configured by the current neural network parameters bythe neural network managing unit 10 c.

On the basis of the NG index value extracted from the NG index valuebuffer 10 e, the neural network updating unit 10 d optimizes the neuralnetwork parameters (step ST1 f). For example, on the basis of the NGindex value extracted from the NG index value buffer 10 e, the neuralnetwork updating unit 10 d optimizes the current neural networkparameters using the gradient descent optimization method described inReference Literature 1. This optimization is performed sequentially eachtime learning is repeated.

Subsequently, the neural network updating unit 10 d determines whetheror not the number of learning repetitions has reached or exceeded apredetermined value (for example, 10000) (step ST2 f).

If the number of learning repetitions is less than the predeterminedvalue (step ST2 f: NO), the neural network updating unit 10 d terminatesthe process in FIG. 17 and proceeds to the process from the step ST2 inFIG. 11 by the neural network managing unit 10 c.

On the other hand, if the number of learning repetitions is greater thanor equal to the predetermined value (step ST2 f: YES), the neuralnetwork updating unit 10 d outputs the neural network parameters at thattime, as a learning result (step ST3 f). The neural network configuredusing the neural network parameters of the learning result functions asa classifier that determines at least one piece of the data belonging tothe NG determination group to be NG.

Next, a classifier obtained by the learning device 1 according to thefirst embodiment will be described.

Here, let us consider a situation where there is a history that a group(group of cases) has been determined to be NG as a whole; however, it isunknown which element in the group is NG, for example, a situation wherethere are three groups of which two groups each have been determined tobe NG as a whole and the remaining one group has been determined to beOK as a whole. One of the groups determined to be NG is defined as an NGdetermination group (1) {E11 (OK), E12 (G), E13 (OK)}, and the other isdetermined as an NG determination group (2) {E21 (G), E22 (OK), E23(OK)}. The group determined to be OK is defined as an OK determinationgroup (3) {E31 (OK), E32 (OK), E33 (OK)}.

In the NG determination group (1), only the second element is NG, andthe remaining elements are OK. Meanwhile in the NG determination group(2), only the first element is NG, and the remaining elements are OK.However, since these groups include NG elements, each of the groups isdetermined to be NG as a whole. Although OK or NG for each element isillustrated inside parentheses of the corresponding element E, OK and NGfor each element is unknown at a stage in which the three groups arehandled as learning data.

Only the determination result of OK or NG for the entire group is knownat the learning stage of the classifier. Therefore, when each of theelements is classified as OK or NG, all of the six elements E11 (OK),E12 (G), E13 (OK), E21 (G), E22 (OK), and E23 (OK) are regarded as NGand thereby learned at the learning stage of the classifier. That is,four of these elements are incorrectly learned as NG despite the factthat the elements are originally OK. As a result, the classificationaccuracy of the classifier as the learning result is deteriorated.

For example in a case where OK or NG is determined for group (4) {E41(OK), E42 (OK), E43 (OK)} and group (5) {E51 (OK), E52 (OK), E53 (G)},an element that is originally OK is incorrectly learned as NG in aconventional classifier, and thus there is a possibility that any one ofthe elements belonging to group (4) is determined as NG. If any one ofthe elements belonging to group (4) is determined to be NG,disadvantageously, the entire group (4) is also determined to be NG. Asdescribed above, conventional classifiers have low classificationaccuracy for each element and low classification accuracy for eachgroup.

Meanwhile, in the learning device 1 according to the first embodiment, alearning reference label, obtained by assigning an OK label or an NGlabel to each element, is updated on the basis of a result of astatistical test on the change trend of NG index values. As a result, itis rare for the learning unit 10 to incorrectly learn an element that isoriginally OK as NG, and thus the learning unit 10 can learn aclassifier that performs highly accurate classification.

In addition, since the classifier as the learning result determines atleast one piece of data belonging to the NG determination group to beNG, if group (5) is an NG determination group, group (5) isappropriately determined to be NG, whereas group (4) is determined to beOK.

As described above, the learning device 1 according to the firstembodiment includes the learning unit 10 and the dynamic update unit 11.The learning unit 10 learns a neural network by inputting the multipleelements of the learning data and using a learning reference label, andthereby outputs a classifier for determining at least one piece of thedata belonging to the group to be NG using the neural network as thelearning result. The dynamic update unit 11 dynamically updates thelearning reference label while the learning unit 10 learns the neuralnetwork. In this configuration, the learning unit 10 repetitively learnsthe neural network by sequentially using the learning reference labelupdated from the initial value of the learning reference label by thedynamic update unit 11, and calculates an NG index value correspondingto an element of the learning data using an output value of the neuralnetwork for each repetition of learning. The dynamic update unit 11updates the learning reference label on the basis of a result obtainedby statistically testing a change trend of the NG index value obtainedfor each transition of the number of learning repetitions. Since theclassifier as the learning result determines that at least one piece ofthe data belonging to the group is NG, the learning device 1 can providea classifier that performs highly accurate classification.

Note that the present invention is not limited to the above embodiment,and a modification of any component of the embodiment, or omission ofany component in the embodiment may be adopted within the scope of thepresent invention.

INDUS TRIAL APPLICABILITY

A learning device according to the present invention can provide aclassifier that performs highly accurate classification, and thus can beused in, for example, an abnormality detection system.

REFERENCE SIGNS LIST

1: learning device, 2: learning data DB, 3: NG determination group DB,10: learning unit, 10 a: learning reference label buffer, 10 b: learningreference label generating unit, 10 c: neural network managing unit, 10d: neural network updating unit, 10 e: NG index value buffer, 11:dynamic update unit, 11 a: history buffer, 11 b: NG candidate buffer, 11c: history managing unit, 11 d: test unit, 11 e: learning referencelabel updating unit, 100: information input interface, 101: DBinput/output interface, 102: database, 103: information outputinterface, 104: processing circuit, 105: processor, 106: memory

1. A learning device comprising: processing circuitry to input learningdata including multiple elements and group information in which it isdefined that at least one piece of data belonging to a group isdetermined to be NG, and learn a neural network by inputting themultiple elements of the learning data and using a learning referencelabel assigned with an OK label or an NG label for each of the elementsof the learning data, thereby output a classifier to determine the atleast one piece of data belonging to the group to be NG using the neuralnetwork which is a result of the learning; and to dynamically update thelearning reference label during learning of the neural network, whereinthe processing circuitry: generates an initial value of the learningreference label for each of the elements of the learning data by usingthe learning data and the group information; repetitively learns theneural network, by sequentially using the learning reference labelupdated from the initial value of the learning reference label; andcalculates an NG index value with which each of the elements of thelearning data can be NG, by using an output value of the neural networkfor each repetition of learning, and the processing circuitry updatesthe learning reference label, on a basis of a result obtained bystatistically testing a change trend of the NG index value obtained foreach transition of the number of learning repetitions.
 2. The learningdevice according to claim 1, wherein the processing circuitry: storesthe learning reference label for each of the elements of the learningdata; generates an initial value of the learning reference label, theinitial value being obtained by, in a case where each of the elements ofthe learning data does not belong to the group, assigning an OK label toa corresponding one of the elements, and in a case where each of theelements belongs to the group, assigning an NG label to a correspondingone of the elements; calculates the NG index value of each of theelements of the learning data using an output value of the neuralnetwork, determines, out of an OK class and an NG class, a class towhich each of the elements of the learning data belongs on a basis ofthe NG index value, and performs an error evaluation on the initialvalue of the learning reference label, the updated learning referencelabel, and the determined class; and updates neural network parameterson a basis of the calculated NG index value.
 3. The learning deviceaccording to claim 1, wherein the processing circuitry: stores the NGindex value obtained for each number of learning repetitions; stores,for each of the elements of the learning data, the number of learningrepetitions, an NG candidate level corresponding to the NG index value,an OK confirmed flag indicating that a corresponding one of the elementsof the learning data is confirmed to be OK, and an NG confirmed flagindicating that a corresponding one of the elements of the learning datais confirmed to be NG; stores the NG index value obtained for eachrepetition of learning; statistically tests a change trend of the storedNG index value by using transition of the NG candidate level, confirmsOK or NG on one or more NG candidate elements of the elements on a basisof a result of the test, and updates the OK confirmed flag or the NGconfirmed flag corresponding to each of the NG candidate elements; andupdates, from an NG label to an OK label, the learning reference labelcorresponding to an element confirmed to be OK, out of the NG candidateelements.
 4. A learning method comprising: inputting learning dataincluding multiple elements and group information in which it is definedthat at least one piece of data belonging to a group is determined to beNG, and learning a neural network by inputting the multiple elements ofthe learning data and using a learning reference label assigned with anOK label or an NG label for each of the elements of the learning data,thereby outputting a classifier to determine the at least one piece ofdata belonging to the group to be NG using the neural network which is aresult of the learning; and dynamically updating the learning referencelabel during learning of the neural network, wherein the methodincludes: generating an initial value of the learning reference labelfor each of the elements of the learning data by using the learning dataand the group information; repetitively learning the neural network, bysequentially using the learning reference label updated from the initialvalue of the learning reference label; and calculating an NG index valuewith which each of the elements of the learning data can be NG, by usingan output value of the neural network for each repetition of learning,and updating the learning reference label, on a basis of a resultobtained by statistically testing a change trend of the NG index valueobtained for each transition of the number of learning repetitions.